package com.yuw.hw20190404.test07;

public class Vehicle {

	// 属性
	private String vehicleName;
	private String vehicleColor;
	private double vehicleSpeed;

	// 行为

	/**
	 * 行驶行为
	 */
	public void drive() {
		System.out.println(vehicleColor +" 颜色的 "+ vehicleName + "品牌的汽车正在以" + vehicleSpeed + "速度进行行驶");
	}

	// 构造方法

	public Vehicle(String vehicleName, String vehicleColor) {
		super();
		this.vehicleName = vehicleName;
		this.vehicleColor = vehicleColor;
		// 原始默认速度为0
		this.vehicleSpeed = 0.0;
	}

	public Vehicle() {
		super();
		// 原始默认速度为0
		this.vehicleSpeed = 0.0;
	}

	public String getVehicleColor() {
		return vehicleColor;
	}

	public void setVehicleColor(String vehicleColor) {
		this.vehicleColor = vehicleColor;
	}

	public double getVehicleSpeed() {
		return vehicleSpeed;
	}

	public void setVehicleSpeed(double vehicleSpeed) {
		this.vehicleSpeed = vehicleSpeed;
	}

	public String getVehicleName() {
		return vehicleName;
	}
	
	
}
